import { ChangeDetectionStrategy, Component } from '@angular/core';
import { CommonModule } from '@angular/common';
import { MatButtonModule } from '@angular/material/button';
import { MatIconModule } from '@angular/material/icon';
import { RouterModule } from '@angular/router';

@Component({
  selector: 'cne-exception-500',
  standalone: true,
  imports: [CommonModule, MatButtonModule, MatIconModule, RouterModule],
  template: `
    <div class="exception-container">
      <div class="exception-content">
        <div class="exception-icon">
          <mat-icon>error</mat-icon>
        </div>
        <h1 class="exception-title">500</h1>
        <p class="exception-description">抱歉，服务器内部错误</p>
        <button mat-raised-button color="primary" routerLink="/home">
          <mat-icon>home</mat-icon>
          返回首页
        </button>
      </div>
    </div>
  `,
  styles: [`
    .exception-container {
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: 100vh;
      background-color: #f5f5f5;
    }
    
    .exception-content {
      text-align: center;
      padding: 2rem;
    }
    
    .exception-icon {
      font-size: 4rem;
      color: #f44336;
      margin-bottom: 1rem;
    }
    
    .exception-title {
      font-size: 3rem;
      font-weight: 300;
      color: #333;
      margin: 0 0 1rem 0;
    }
    
    .exception-description {
      font-size: 1.2rem;
      color: #666;
      margin-bottom: 2rem;
    }
  `],
  changeDetection: ChangeDetectionStrategy.OnPush
})
export class Exception500Component {

}
